<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<title>注册</title>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<link rel="stylesheet" type="text/css" href="resources/bootstrap/css/bootstrap-responsive.css">
		<link rel="stylesheet" type="text/css" href="resources/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="resources/css/basic.css">
		<link rel="stylesheet" type="text/css" href="resources/css/register.css">
		
		<script type="text/javascript" src="${basePath}resources/js/common/base.js"></script>
		<script type="text/javascript" src="${basePath}resources/js/common/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="resources/bootstrap/js/bootstrap.js"></script>
		<script type="text/javascript" src="resources/angular-1.3.0/angular.min.js"></script>
		<script type="text/javascript" src="resources/js/common/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="resources/js/register.js"></script>
	</head>
	<body ng-app="myApp" ng-controller="registerController">
		<div id="header">
			<%@ include file="common/header.jsp" %>
			<h1>注册</h1>
		</div>
		<div id="container">
			<form onsubmit="return false;" method="post" name="registerForm">
				<p>
					<label class="label label-length" for="email">电子邮件</label>
					<input type="email" name="email" ng-model="email" required />
					<button type="button" ng-click="sendMailCode()" class="btn btn-primary">发送邮箱验证码</button>
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="code">邮件验证码</label>
					<input type="text" name="code" ng-model="code" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="username">用户名</label>
					<input type="text" name="username" ng-model="username" placeholder="用户名" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="truename">真实姓名</label>
					<input type="text" name="truename" ng-model="truename" placeholder="真实姓名"/>
				</p>
				<p>
					<label class="label label-length" for="password">密码</label>
					<input type="password" name="password" ng-model="password" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="confirmPassword">确认密码</label>
					<input type="password" name="confirmPassword" ng-model="confirmPassword" required />
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="gender">性别</label>
					<input type="radio" name="gender" ng-model="gender" value="1" required />男
					<input type="radio" name="gender" ng-model="gender" value="2" required />女
					<span class="requireItem">*</span>
				</p>
				<p>
					<label class="label label-length" for="phone">手机号码</label>
					<input type="text" name="phone" ng-model="phone" />
				</p>
				<p>
					<input type="submit" class="btn btn-primary" name="registerBtn" id="registerBtn" value="注册" ng-click="register()" ng-disabled="registerForm.$invalid"/>
				</p>
			</form>
		</div>
		<div id="footer">
			<%@ include file="common/footer.jsp" %>
		</div>
	</body>
</html>